package unidad6;

public class StringBufferDemo {

	public static void main(String [] args)throws Exception{
		
		StringBuffer sb = new StringBuffer("Hello ");
		StringBuffer sb2 = new StringBuffer();
		char cCharacter = ' ';
		
		System.out.println("Enter a Name");
		
		while((cCharacter =(char)System.in.read()) != '\n'){
			
		sb2.append(cCharacter);	
			
		}
		sb.insert(6, sb2);
		System.out.println(sb.capacity()+" Capacity");
		sb.delete(0, 9);
		System.out.println(sb.reverse());
		System.out.println(sb);
		
		
	}
	
}
